﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Systems : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
		if (!IsPostBack)
		{
			HideAll();
			if (Master.m_isLoggedIn)
			{
				btnAddSystem.Enabled = true;
				btnAddSystem.ToolTip = "";
			}
			else
				btnAddSystem.ToolTip = "Disabled because you are not logged in";
		}
		
	}
	protected void btnAddSystem_Click(object sender, EventArgs e)
	{
		HideAll();
		pnlAdd1.Visible = true;
		pnlAdd1.Enabled = true;
		txtName.Text = "";
		txtRAM.Text = "";
		txtUsage.Text = "";
		lblComputerID.Text = "Adding new System";
	}
	protected void lbSystem_SelectionChanged(object sender, EventArgs e)
	{
		
	}
	protected void btnAdd1_2_Click(object sender, EventArgs e) {
		HideAll();
		pnlAdd2.Visible = true;
	}

	// Helper methods
	private void HideAll()
	{
		pnlAdd1.Visible = false;
		pnlAdd2.Visible = false;
	}
}
